function serach() {
    var countryId=document.getElementById("country");
    var country=countryId.options[countryId.selectedIndex].text;
    var city=$("#city").val();
    var data_in=$("#checkin").val();

    if (data_in == '' || data_in == undefined || data_in == null){
        data_in=getDate();
    }

    var data_out=$("#checkout").val();
    if (data_out == '' || data_out == undefined || data_out == null){
        data_out=getLdate();
    }

    var adultId=document.getElementById("adu");
    var adult=adultId.options[adultId.selectedIndex].text;
    var childId=document.getElementById("chi");
    var child=childId.options[childId.selectedIndex].text;
    var hotel={
        city:country,
        hotel_translated_name:city,
    };
    $.ajax({
        type:"post",
        url:"hotel/hotelS",
        data:hotel,
        success:function (data) {
            window.location.href="hotel/show1";
        },
        error:function () {
            alert("error")
        }
    });

}
function getDate() {
    var myDate=new Date();
    var nowTime=add_10(myDate.getMonth()+1)+'/'+myDate.getDate()+'/'+myDate.getFullYear();
    return nowTime;
}
function getLdate() {
    var myDate=new Date();
    var day=myDate.getDate()+1
    var nowDate=add_10(myDate.getMonth()+1)+'/'+day+'/'+myDate.getFullYear();
    return nowDate;

}
function add_10(num) {
    if (num<10) {
        num='0'+num;
    }
    return num;
}